<%--<%@ include file="../common/top.jsp" %>--%>
<%--<script src="https://kit.fontawesome.com/ded7430fd5.js" crossorigin="anonymous"></script>--%>

<%--<div class="Back">--%>
<%--    <c:if test="${sessionScope.category!=null}">--%>
<%--    <a href="categoryForm?categoryId=${sessionScope.category.categoryId}" class="BackLink">--%>
<%--        <i class="fa-solid fa-circle-left"></i> Return to ${sessionScope.category.name}--%>
<%--    </a>--%>
<%--    </c:if>--%>

<%--    <c:if test="${sessionScope.category==null}">--%>
<%--    <a href="mainForm" class="BackLink">--%>
<%--        <i class="fa-solid fa-circle-left"></i> Return to Main Menu--%>
<%--    </a>--%>
<%--    </c:if>--%>
<%--</div>--%>

<%--<div class="Catalog">--%>
<%--    <c:if test="${sessionScope.product != null}">--%>
<%--        <h2>${sessionScope.product.name}</h2>--%>
<%--    </c:if>--%>
<%--    <c:if test="${sessionScope.product == null}">--%>
<%--        <h2></h2>--%>
<%--    </c:if>--%>



<%--    <!--<table>--%>
<%--        <tr>--%>
<%--            <th>Item ID</th>--%>
<%--            <th>Product ID</th>--%>
<%--            <th>Description</th>--%>
<%--            <th>List Price</th>--%>
<%--            <th>&nbsp;</th>--%>
<%--        </tr>--%>
<%--        <c:forEach var="item" items="${sessionScope.itemList}">--%>
<%--            <tr>--%>
<%--                <td>--%>
<%--                    <a href="itemForm?itemId=${item.itemId}">${item.itemId}</a>--%>
<%--                </td>--%>
<%--                <td>${item.product.productId}</td>--%>
<%--                <td>--%>
<%--                        ${item.attribute1} ${item.attribute2} ${item.attribute3}--%>
<%--                        ${item.attribute4} ${item.attribute5} ${sessionScope.product.name}--%>
<%--                </td>--%>
<%--                <td><fmt:formatNumber value="${item.listPrice}" pattern="$#,##0.00"/></td>--%>
<%--                <td>--%>
<%--                    <a href="addItemToCart?workingItemId=${item.itemId}" class="Button">Add to Cart</a>--%>
<%--                </td>--%>
<%--            </tr>--%>
<%--        </c:forEach>--%>
<%--    </table>--%>
<%--    -->--%>
<%--    <div class="ProductMain">--%>
<%--<c:if test="${!empty sessionScope.itemList}">--%>
<%--    <c:forEach var="item" items="${sessionScope.itemList}">--%>
<%--        <div class="Product">--%>
<%--            <div class="ProductImg">--%>
<%--                <a href="itemForm?itemId=${item.itemId}" >${item.product.thum.substring(0,item.product.thum.indexOf(">"))} class="ProductImgLink"></a>--%>
<%--            </div>--%>
<%--            <div class="ProductDescription">--%>
<%--                <b>--%>
<%--                    <a href="itemForm?itemId=${item.itemId}" class="ProductDescriptionLink">${item.attribute1} ${item.attribute2} ${item.attribute3}--%>
<%--                        ${item.attribute4} ${item.attribute5} ${item.product.name}--%>
<%--                    </a>--%>
<%--                </b>--%>
<%--            </div>--%>
<%--            <div class="ProductPrice">--%>
<%--                <b>--%>
<%--                    <a href="itemForm?itemId=${item.itemId}" class="ProductPriceLink" ><fmt:formatNumber value="${item.listPrice}" pattern="$#,##0.00"/></a>--%>
<%--                </b>--%>
<%--            </div>--%>
<%--            <div class="Button">--%>
<%--                <a href="addItemToCart?workingItemId=${item.itemId}" class="ButtonLink"><i class="fa-solid fa-cart-shopping"></i>Add to Cart</a>--%>
<%--            </div>--%>

<%--        </div>--%>

<%--    </div>--%>
<%--    </c:forEach>--%>
<%--    </c:if>--%>
<%--    <c:if test="${empty sessionScope.itemList}">--%>
<%--        <h2>Sorry for that nothing was found here...</h2>--%>
<%--    </c:if>--%>

<%--</div>--%>





<%--</div>--%>

<%--<div class="ProductFooter">--%>

<%--    <div id="PoweredBy">&nbsp<a href="http://www.csu.edu.cn">www.csu.edu.cn</a>--%>
<%--    </div>--%>

<%--    <div id="Banner">--%>

<%--        <c:if test="${sessionScope.loginAccount != null }">--%>
<%--            <c:if test="${sessionScope.loginAccount.bannerOption}">--%>
<%--                ${sessionScope.loginAccount.bannerName}--%>
<%--            </c:if>--%>
<%--        </c:if>--%>
<%--    </div>--%>

<%--</div>--%>


<%--</body>--%>
<%--</html>--%>

























<%@ include file="../common/top.jsp" %>
<script src="https://kit.fontawesome.com/ded7430fd5.js" crossorigin="anonymous"></script>

<div class="Back">
    <c:if test="${sessionScope.category!=null}">
        <a href="categoryForm?categoryId=${sessionScope.category.categoryId}" class="BackLink">
            <i class="fa-solid fa-circle-left"></i> Return to ${sessionScope.category.name}
        </a>
    </c:if>

    <c:if test="${sessionScope.category==null}">
        <a href="mainForm" class="BackLink">
            <i class="fa-solid fa-circle-left"></i> Return to Main Menu
        </a>
    </c:if>
</div>

<div class="Catalog">
    <c:if test="${sessionScope.product != null}">
        <h2>${sessionScope.product.name}</h2>
    </c:if>
    <c:if test="${sessionScope.product == null}">
        <h2></h2>
    </c:if>



    <!--<table>
        <tr>
            <th>Item ID</th>
            <th>Product ID</th>
            <th>Description</th>
            <th>List Price</th>
            <th>&nbsp;</th>
        </tr>
        <c:forEach var="item" items="${sessionScope.itemList}">
            <tr>
                <td>
                    <a href="itemForm?itemId=${item.itemId}">${item.itemId}</a>
                </td>
                <td>${item.product.productId}</td>
                <td>
                        ${item.attribute1} ${item.attribute2} ${item.attribute3}
                        ${item.attribute4} ${item.attribute5} ${sessionScope.product.name}
                </td>
                <td><fmt:formatNumber value="${item.listPrice}" pattern="$#,##0.00"/></td>
                <td>
                    <a href="addItemToCart?workingItemId=${item.itemId}" class="Button">Add to Cart</a>
                </td>
            </tr>
        </c:forEach>
    </table>
    -->
    <div class="ProductMain">
        <c:if test="${!empty sessionScope.itemList}">
        <c:forEach var="item" items="${sessionScope.itemList}">
        <div class="Product">
            <div class="ProductImg">
<%--                <a href="itemForm?itemId=${item.itemId}" >${item.product.thum.substring(0,item.product.thum.indexOf(">"))} class="ProductImgLink"></a>--%>
                <a href="itemForm?itemId=${item.itemId}" >${item.product.description.substring(0,item.product.description.indexOf(">"))} class="ProductImgLink"></a>
            </div>
            <div class="ProductDescription">
                <b>
                    <a href="itemForm?itemId=${item.itemId}" class="ProductDescriptionLink">${item.attribute1} ${item.attribute2} ${item.attribute3}
                            ${item.attribute4} ${item.attribute5} ${item.product.name}
                    </a>
                </b>
            </div>
            <div class="ProductPrice">
                <b>
                    <a href="itemForm?itemId=${item.itemId}" class="ProductPriceLink" ><fmt:formatNumber value="${item.listPrice}" pattern="$#,##0.00"/></a>
                </b>
            </div>
            <div class="Button">
                <a href="addItemToCart?workingItemId=${item.itemId}" class="ButtonLink"><i class="fa-solid fa-cart-shopping"></i>Add to Cart</a>
            </div>

        </div>

    </div>
    </c:forEach>
    </c:if>
    <c:if test="${empty sessionScope.itemList}">
        <h2>Sorry for that nothing was found here...</h2>
    </c:if>

</div>

</div>

<%@ include file="../common/bottom.jsp"%>


</body>
</html>



